std::vector::reserve

From Cppreference

Jump to: navigation, search
void reserve( size_type size );

Sets the capacity of the container to at least size. New storage is allocated if necessary.

Contents

Parameters

size - new capacity of the container

Return value

(none)

Complexity

linear in the size of the container

See also

capacity
returns the number of elements that can be held in currently allocated storage
(public member function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages